<!-- eslint-disable vue/multi-word-component-names -->
<script setup>
import { onMounted, ref } from "vue";
import { getTodayTip } from "@/api/tip";

let author = ref();
let content = ref();

onMounted(async () => {
  const res = await getTodayTip();
  author.value = res.author;
  content.value = res.author;
});
</script>

<template>
  <el-card class="box-card" shadow="never">
    <slot name="header">
      <span>每日一句</span>
    </slot>
    <div>
      <div class="has-text-left block">{{ content }}</div>
      <div class="has-text-right mt-5 block">——{{ author }}</div>
    </div>
  </el-card>
</template>

<style scoped lang="less"></style>
